import useDepartStore from "@/store/departModule";
import {IListItem} from "@/views/Home/Main/types";
import {computed} from "vue";

export const departStore = useDepartStore()
export const dataSource = computed(() => {
    return departStore.departList.map((item, index) => {
        const listItem: IListItem = {
            key: index,
            ID: item.id,
            title: item.title
        }
        return listItem
    })
})
export const columns = [
    {
        title: 'ID',
        dataIndex: 'ID',
        key: 'ID',
        align: 'center'
    },
    {
        title: '部门名称',
        dataIndex: 'title',
        key: 'title',
        align: 'center'
    },
    {
        title: '操作',
        dataIndex: 'operation',
        key: 'operation',
        align: "center"
    },
]
